@mixin flex($direction:column,$items:stretch,$justify:space-between){
    display: flex;
    flex-direction: $direction;
    align-items: $items;
    justify-content: $justify;
}

@mixin modalCenter($width:600px,$top:50%,$bottom:auto,$translateY: -50%) {
    width: $width;
    position: absolute;
    top: $top;
    left: 50%;
    bottom: $bottom;
    transform: translate(-50% ,#{$translateY});
}



$buttonHeight: 26px;
$bdColor:#d7d7d7;
$headerFontSize: 16px;
$headerOrLiHeight: 44px;
$modalBgColor:white;

.error{
    color: red;
    margin-left: 148px;
}

.panel_header form.select-group {
    width: 60%;
}

.button-group-control-commodity {
    @include flex(row, center);

    .button-add-product {
        height: $buttonHeight;
        line-height: $buttonHeight;
        padding-top: 0px;
        padding-bottom: 0px;
        margin-left: 10px;
    }
}

.select-group label {
    white-space: nowrap;
    margin-bottom: 0;
    font-weight: normal;
    width: 17%;
}

.select-group label:nth-of-type(4) {
    position: relative;
    top: 1px;
}

.select-group .form-control {
    background-color: $modalBgColor;
    border: 1px solid $bdColor;
    padding: 0px;
    padding-left: 10px;
    height: 28.13px;
    line-height: 28.13px;
    width: 100%;
}


div, h2, form, button {
    margin: 0px;
    padding: 0px;
}

#content {
    top: 60px;
}

.panel_header {
    height: 44px;
    line-height: 44px;
    background: -webkit-linear-gradient(top, #f3f3f3, #eeeeee);
    background: -moz-linear-gradient(top, #f3f3f3, #eeeeee);
    background: linear-gradient(top, #f3f3f3, #eeeeee);
    border-bottom: 1px solid #3b4756;
    text-align: center;
    font-size: $headerFontSize;
}

.panel_header .button-group {
    position: absolute;
    left: 10px;
    top: 0px;
}

.panel_header .button-group button {
    height: $buttonHeight;
    line-height: $buttonHeight;
    padding-top: 0px;
    padding-bottom: 0px;
}

.panel_header h2 {
    font-size: $headerFontSize;
    font-weight: normal;
    line-height: $headerOrLiHeight;
}

#content .panel_header .form-inline {
    margin-right: 10px;
}

.panel_header .form-inline .input-group {
    left: 10px;
}

#content .panel_header .form-inline  input {
    height: 28px;
    line-height: 28px;
    width: 300px;
}

.panel_header .form-inline button {
    height: 28px;
    position: relative;
    top: -0.5px;
}

.panel_title {
    padding: 0px;
    line-height: $headerOrLiHeight;
    border-bottom: 1px solid $bdColor;
    color: #777777;
}

.list {
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -15px;
    height: 740px;
}

.list .list-item {
    height: $headerOrLiHeight;
    line-height: $headerOrLiHeight;
    border-bottom: 1px solid $bdColor;
    padding-left: 15px;
}

.list .list-item div:last-child {
    padding-left: 5px;
}

.list .list-item:last-child {
    border-bottom: none;
}

.list .list-item:hover {
    background-color: #ececec;
}

.list .list-item:last-child:hover {
    background-color: transparent;
}

.nomore {
    text-align: center;
    line-height: 2.5;
    font-size: 12px;
    color: #ADB7C3;
}

.panel_footer {
    height: 36px;
    line-height: 36px;
    background: -webkit-linear-gradient(top, #f3f3f3, #eeeeee);
    background: -moz-linear-gradient(top, #f3f3f3, #eeeeee);
    background: linear-gradient(top, #f3f3f3, #eeeeee);
    border-top: 1px solid #3b4756;
    position: absolute;
    width: 100%;
    bottom: 0px;
}

.panel_footer p {
    margin: 0px;
    padding: 0px;
    margin-left: 10px;
    color: #ADB7C3;
    font-size: 12px;
}

.aside-slider-content {
    width: 400px;
    position: absolute;
    top: 0px;
    right: -400px;
    bottom: 0px;
    @include flex();
    z-index: 2;
    background-color: $modalBgColor;
    box-shadow: -2px 0 4px #3b4756;
    transition: right 0.5s ease-in-out;
}

.aside-slider-content .panel_footer{
    position: relative;
}

.cancel {
    cursor: pointer;
}

.panel_header span.cancel {
    float: right;
    line-height: $headerOrLiHeight;
    display: inline-block;
    margin-right: 10px;
}

.aside-slider-content .panel_body {
    flex-grow:1;
    overflow-y: auto;
}
.aside-slider-content .panel_body .list-group .list-group-item {
    line-height: $headerOrLiHeight;
    padding-top: 0px;
    padding-bottom: 0px;
    @include flex(row, flex-start, flex-start);
}

.aside-slider-content .panel_body .list-group .list-group-item .item-title {
    width: 100px;
    min-width: 100px;
    padding-left: 10px;
}

.aside-slider-content .panel_footer {
    padding-left: 10px;
}

.aside-slider-content .panel_footer button {
    height: $buttonHeight;
    line-height: $buttonHeight;
    padding-top: 0px;
    padding-bottom: 0px;
    margin-bottom: 5px;
}

.masking {
    display: none;
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    background-color: #000000;
    opacity: 0.8;
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
    filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
    z-index: 2;
}


.container-delete-product.modal-small {
    display: none;
    width: 600px;
    height: 260px;
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    background-color: $modalBgColor;
    z-index: 3;
}

.modal-small .panel_body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
}

.modal-small .panel_body .iconfont {
    flex-grow: 2;
    font-size: 56px;
    align-self: center;
    justify-content: flex-end;
    color: #fcad3a;
    padding-right: 30px;
}

.modal-small .panel_body p:last-child {
    flex-grow: 3;
}

.container-delete-product .panel_header {
    font-size: 16px;
}

.container-delete-product .panel_body {
    padding: 15px;
}

.container-product-new .panel_body .list-group {
    padding-left: 15px;
    padding-right: 15px;
}

.container-product-new .panel_body .list-group .list-group-item {
    padding-right: 0px;
    padding-bottom: 0px;
    margin-top: 10px;
    border: none;
    overflow: hidden;
}

.input-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
}

.input-group label {
    font-weight: normal;
    white-space: nowrap;
    line-height: 28.125px;
    flex-grow: 1;
    -webkit-flex-grow: 1;
}

.input-group .form-control{
    width: 420px;
    height: 28.125px;
    line-height: 28.125px;
}

.container-delete-product .panel_footer {
    padding-right: 10px;
}

.container-delete-product .panel_footer button {
    margin: 0 5px;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 4px;
    height: 26px;
    line-height: 26px;
}

.container-delete-product .panel_body p {
    @include flex(row,center,flex-start);
    margin-top: 60px;
    line-height: 30px;
}

.modal-large{
    z-index: 5;
    background-color: $modalBgColor;
    width: 600px;
    @include modalCenter($top:60px,$bottom:30px,$translateY:0);
    @include flex();
}


.modal-large .list-group-item{
    border: 0;
}

.modal-large .panel-body {
    overflow-y: auto;
    flex-grow: 1;
    -webkit-flex-grow:1;
    padding: 0;
}

.modal-large .panel_footer{
    padding-right: 15px;
    position: relative;
}

.modal-large .panel_footer .btn, .container-delete-product .panel_footer .btn{
    height: $buttonHeight;
    line-height: $buttonHeight;
    padding: 0 12px;
}

.modal-large .list-group {
    margin-top: 20px;
    padding: 20px;
    padding-top: 0;
    border-bottom: 1px solid $bdColor;
}

.modal-large .panel-body .list-group .list-group-item .img-group {
    @include flex(row,flex-start,flex-end);
}

.modal-large .panel-body .list-group .list-group-item .img-group .img-group-item {
    margin-right: 25px;
}

.modal-large .panel-body .list-group .list-group-item .img-group .img-group-item:last-child {
    margin-right: 0px;
}

.sort_products {
    position: relative;
    width: 420px;
    padding: 5px 35px 10px 10px;
    margin: 0;
    border: 1px solid $bdColor;
    height: 42px;
    min-height: 42px;
}

.sort_products > .iconfont {
    font-size: 20px;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 35px;
    @include flex(row, center, center);
}

.sort_products > .iconfont:hover {
    cursor: pointer;
    background-color: #ececec;
}

.modal-large .panel-body .list-group .list-group-item .input-group a {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 28px;
    overflow: hidden;
    line-height: 28px;
    text-align: center;
    font-weight: 500;
    padding-top: 0px;
    margin-top: 0px;
    margin-right: 340px;
}

.modal-large .panel-body .list-group .list-group-item .input-group a input {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 100px;
    opacity: 0;
    filter: alpha(opacity=0);
    width: 80px;
}

.more-end {
    cursor: pointer;
    margin-top: 10px;
    text-align: center;
}

.input-group .form-control {
    height: 28px;
    line-height: 28px;
    padding-top: 0px;
    padding-bottom: 0px;
}

.modal-large .panel-body .color-group {
    border: none;
    padding-left: 0px;
}

.modal-large .list-group .list-group-item .input-group .sm-box{
    width: 180px;
    margin-right: 5px;
}

.modal-large .list-group .list-group-item .input-group .xm-box{
    width: 90px;
    margin-right: 5px;
}

.selected-category,
.selected-fabric {
    @include flex(row, flex-start, flex-start);
    flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    align-content: flex-start;
    -webkit-align-content: flex-start;
    margin: 20px;
    padding: 5px 10px;
    border: 1px solid $bdColor;
    min-height: 42px;
    max-height: 87px;
    overflow-x: hidden;
    overflow-y: auto;
    margin-bottom: 0px;
}

#container-category-tree,
#container-fabric-tree {
    position: relative;
    top: 0px;
    left: 0px;
    right: 20px;
    bottom: 0;
    width: 95%;
    margin: 0 auto;
    outline: none;
}